<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
	<link rel="shortcut icon" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/img/logo.png"/>
	<meta name="apple-mobile-web-app-capable" content="no" />
	<title>营销管理</title>
	<link rel="stylesheet" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/mui/css/mui.min.css">
    <link rel="stylesheet" type="text/css" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/font/iconfont.css">
    <link rel="stylesheet" type="text/css" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/css/app.css?1">
	<style type="text/css">
	</style>
</head>
<body class="store mystore">
	<div class="baseData"></div>
	<div class="baseData"></div>
	<div class="baseData"></div>
	<footer>统采商城提供数据支持</footer>
</body>
<script type="text/javascript" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/js/echarts-all.js?1"></script>
<script type="text/javascript" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/sui/js/SUI.js"></script>
<script type="text/javascript" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/mui/js/mui.min.js"></script>
{{template "wechat/public/share.html" .}}
<script type="text/javascript">
	console.log({{.rnum}})
	console.log({{.onum}})
	console.log({{.mnum}})
	console.log({{.ts}})
        function buildChart(s){
	        var myChart = echarts.init(s.obj);
	        myChart.setOption(s.option);
        }
        buildChart({
        	obj:document.getElementsByClassName("baseData")[0],
        	option:{
			    title: {
			        text: '本周访客',
			        subtext: '我的店铺本周访客统计数据',
			        x: 'center'
			    },
			    xAxis: {
			        type: 'category',
			        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
			    },
			    yAxis: {
			        type: 'value'
			    },
			    series: [{
			        data: {{.rnum}},
			        type: 'line',
			        smooth: true
			    }]
			}
        })
        buildChart({
        	obj:document.getElementsByClassName("baseData")[1],
        	option:{
		    backgroundColor: '#fff',
			    title: {
			        text: '订单统计',
			        // subtext: '店铺热销产品排行',
			        left: 'left',
			        textStyle: {
			            color: '#666'
			        }
			    },

			    tooltip : {
			        trigger: 'item',
			        formatter: "{a} <br/>{b} : {c} ({d}%)"
			    },

		    xAxis: [{
				type: 'category',
				data: {{.ts}}
			}],
			yAxis: [{
		        type: 'value',
		        minInterval:1,
				interval:1,
				splitArea: {
					show: true
				}
		    }],
		    series : [
		        {
		            name:'订单统计',
		            type:'bar',
		            data:{{.onum}},
		            label: {
		                normal: {
		                    textStyle: {
		                        color: 'rgba(255, 255, 255, 0.3)'
		                    }
		                }
		            },
		            labelLine: {
		                normal: {
		                    lineStyle: {
		                        color: 'rgba(255, 255, 255, 0.3)'
		                    },
		                    smooth: 0.2,
		                    length: 10,
		                    length2: 20
		                }
		            },
		            itemStyle: {
		                normal: {
		                    color: '#c23531',
		                    shadowBlur: 200,
		                    shadowColor: 'rgba(0, 0, 0, 0.5)'
		                }
		            },
		        },
		         
		    ]
		}
        })
         buildChart({
        	obj:document.getElementsByClassName("baseData")[2],
        	option:{
		    backgroundColor: '#fff',
			    title: {
			        text: '销售额统计',
			        // subtext: '店铺热销产品排行',
			        left: 'left',
			        textStyle: {
			            color: '#666'
			        }
			    },

			    tooltip : {
			        trigger: 'item',
			        formatter: "{a} <br/>{b} : {c} ({d}%)"
			    },

		    xAxis: [{
				type: 'category',
				data: {{.ts}}
			}],
			yAxis: [{
		        type: 'value',
		        minInterval:1,
				interval:1,
				splitArea: {
					show: true
				}
		    }],
		    series : [
		        {
		            name:'订单统计',
		            type:'bar',
		            data:{{.mnum}},
		        },
		         
		    ]
		}
        })
   //      buildChart({
   //      	obj:document.getElementsByClassName("baseData")[2],
   //      	option:{
   //      		 title: {
			//         text: '销量统计',
			//         // subtext: '店铺热销产品排行',
			//         left: 'center',
			//         top: 20,
			//         textStyle: {
			//             color: '#666'
			//         }
			//     },
			//     tooltip : {
			//         trigger: 'axis',
			//         axisPointer : {            // 坐标轴指示器，坐标轴触发有效
			//             type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
			//         }
			//     },
			//     // grid: {
			//     //     left: '3%',
			//     //     right: '4%',
			//     //     bottom: '3%',
			//     //     containLabel: true
			//     // },
			//     xAxis:  [{
			//         type: 'value'
			//     }],
			//     yAxis: [{
			//         type: 'category',
			//         data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
			//     }],
			//     series: [
			//         {
			//             name: '直接访问',
			//             type: 'bar',
			//             stack: '总量',
			//             label: {
			//                 normal: {
			//                     show: true,
			//                     position: 'insideRight'
			//                 }
			//             },
			//             data: [{{.mnum}}]
			//         },
			//     ]
			// }
   //      })
</script>
</html>